<?php

header('Content-type:text/html;charset=utf-8');

require_once './lib/Spider.php';
require_once './lib/Resource.php';

$type = isset($_GET['type']) ? $_GET['type'] : '';

$spider = new \magein\region\lib\Spider();

if ($type == 'check') {
    $spider->check(true);
    die();
}

$region = $spider->getData();

//$res = new \magein\region\lib\Resource($region);
//
//$res->createSql();


